From: Jim Blandy Date: Wed, 17 Mar 1993 20:11:00 +0000 (+0000) Subject: * xterm.c (x_display_box_cursor, x_display_bar_cursor): Don't X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96825 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=49d838ea4acbf67e158c1f181a29d62b83c09052;p=emacs.git * xterm.c (x_display_box_cursor, x_display_bar_cursor): Don't display the cursor on garbaged frames. --- diff --git a/src/xterm.c b/src/xterm.c index 53a57e688e2..c6f61668e1a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3328,7 +3328,10 @@ x_display_bar_cursor (f, on) { struct frame_glyphs *current_glyphs = FRAME_CURRENT_GLYPHS (f); - if (! FRAME_VISIBLE_P (f)) + /* This is pointless on invisible frames, and dangerous on garbaged + frames; in the latter case, the frame may be in the midst of + changing its size, and curs_x and curs_y may be off the frame. */ + if (! FRAME_VISIBLE_P (f) || FRAME_GARBAGED_P (f)) return; if (! on && f->phys_cursor_x < 0) @@ -3394,7 +3397,10 @@ x_display_box_cursor (f, on) { struct frame_glyphs *current_glyphs = FRAME_CURRENT_GLYPHS (f); - if (! FRAME_VISIBLE_P (f)) + /* This is pointless on invisible frames, and dangerous on garbaged + frames; in the latter case, the frame may be in the midst of + changing its size, and curs_x and curs_y may be off the frame. */ + if (! FRAME_VISIBLE_P (f) || FRAME_GARBAGED_P (f)) return; /* If cursor is off and we want it off, return quickly. */